home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: telepost.no!statoil!usenet
- From: Bjorn Thomassen <konbot@ST.Statoil.notes.telemax>
- Subject: Re: Using BC4.5 TArrayAsVector of my class in a class!
- Content-Type: text/plain; charset=us-ascii
- Message-ID: <1996Jan4.085404.7801@statoil.no>
- Sender: usenet@statoil.no
- Nntp-Posting-Host: 143.97.108.156
- Content-Transfer-Encoding: 7bit
- Organization: Delfi Data AS
- References: <DKMHJE.B0B@westminster.ac.uk>
- Mime-Version: 1.0
- Date: Thu, 4 Jan 1996 08:54:04 GMT
- X-Mailer: Mozilla 1.1NOV (Windows; I; 16bit)
-
- An instance of TSArrayAsVector needs at least one argument (upper) to be
- constructed. To make it dynamical, you need to provide
- all three arguments: upper, lower, delta :
-
-
- /* Change here*/
- Pack::Pack() : pack(52)
- {
- Card card;
- SUIT suit;
- RANK rank;
-
- NumberOfCards=0;
-
- for(suit=clubs;suit<=spades;suit++)
- for(rank=two;rank<=ace;rank++)
- {
- card.SetSuit(suit);
- card.SetRank(rank);
- card.SetFace(down);
- AddCard(card);
- NumberOfCards++;
- }
- }
-
-
-
- As you can see, just add ': pack(52)' at the end of the function definition header.
-
-
-